#ifdef GL_ES
precision highp float;
#endif

uniform vec2 resolution;
uniform float time;
uniform sampler2D tex0;
uniform sampler2D tex1;
uniform sampler2D tex2;

void main(void)
{
	vec2 q = gl_FragCoord.xy / resolution.xy;
	vec2 uv = 0.5 + (q-0.5)*(0.9 + 0.1*sin(0.2*time));
	
	vec3 col;
	
	col.r = texture2D(tex0,vec2(uv.x+0.003,uv.y)).r;
	col.g = texture2D(tex0,vec2(uv.x+0.000,uv.y)).g;
	col.b = texture2D(tex0,vec2(uv.x-0.003,uv.y)).b;
	
	col = clamp(col*0.5+0.5*col*col*1.2,0.0,1.0);
	
	col *= 0.5 + 0.5*16.0*uv.x*uv.y*(1.0-uv.x)*(1.0-uv.y);
	
	col *= vec3(0.8,1.0,0.7);
	
	col *= 0.9+0.1*sin(10.0*time+uv.y*1000.0);
	
	col *= 0.97+0.03*sin(110.0*time);
	
	gl_FragColor = vec4(col,1.0);
}
